import request from '@/config/axios'
// ROI API
export const RoiApi = {
  // 按部门查询ROI
  getDeptRoiPage: async (params: any) => {
    return await request.get({
      url: `/facebook/adset-everday-cost/getDeptRoiPage`,
      params
    })
  },
  // 按成员查询ROI
  getCreaterRoiPage: async (params: any) => {
    return await request.get({
      url: `/facebook/adset-everday-cost/getCreaterRoiPage`,
      params
    })
  },
  // 按地区查询ROI
  getAreaRoiPage: async (params: any) => {
    return await request.get({
      url: `/facebook/adset-everday-cost/getAreaRoiPage`,
      params
    })
  },
  // 按商品查询ROI
  getProductRoiPage: async (params: any) => {
    return await request.get({
      url: `/facebook/adset-everday-cost/getProductRoiPage`,
      params
    })
  },
  //获取总消耗
  getRoiTotalCost: async (params: any) => {
    return await request.get({
      url: `/facebook/adset-everday-cost/getRoiTotalCost`,
      params
    })
  },
  // 导出Excel
  exportRoi: async (params) => {
    return await request.download({
      url: `/facebook/adset-everday-cost/export-roi-excel`,
      params
    })
  }
}
